<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page import="java.sql.*"%>
<%@ page import="schronisko.*,Users.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="../styles/forms.css">
<style>
body {
	background: #c6b154;
}
</style>
<title>Odpowiedz na wiadomosc</title>
</head>
<body>
<% if(session.getAttribute("ID") != null){ %>
<a href="../admin/messages.jsp"> Powrot do panelu</a>
<center>

<h1>Odpisywanie do: <% out.println(session.getAttribute("email")); %></h1>
<form method = "post" action="../Answer"  class='form-container'>
<div class="form-title"><h2>Odpisywanie</h2></div>
<textarea id="msg" name="msg" cols="150" rows="20" class="form-field"></textarea>
<input id='email' name='email' type='hidden' value=<% out.println(session.getAttribute("email")); %>>
<div class="submit-container">
<input class="submit-button" type='submit' value='Odpisz'>
</div>
</form>
</center>
<%
}
else {
	out.println("<div class='menu'><b>Sesja wygasla.</b><br> Za 3 sec nastapi przeniesienie do strony logowania <br> Kliknij, jesli nie zadziala:<br> <a href = '../index.jsp'> Wroc do strony glownej</a></div>");
	response.setHeader("Refresh", "3; URL=../index.jsp");
}
%>
</body>
</html>